from django.conf.urls import url
from rest_framework.routers import DefaultRouter

from . import views

urlpatterns = [
    url(r'^questions/$', views.Question.as_view()),
    url(r'^hotlabels/$', views.HotLabel.as_view()),
    url(r'^sub_question/$', views.CreateQuestion.as_view()),
    url(r'^questions/(?P<pk>\d+)/$',views.QuestionRetrieveAPIView.as_view()),
    url(r'^questions/(?P<pk>\d+)/answers/$',views.AnswerListAPIView.as_view()),
    url(r'^questionlikes/$',views.ClickLikeAPIView.as_view()),
    url(r'^questions/(?P<pk>\d+)/similarity/$',views.SimilarityQusetionsAPIView.as_view()),
    url(r'^labels/$',views.LabelListAPIView.as_view()),
    url(r'^labels/attention/$',views.AttentionLabelAPIView.as_view()),
    url(r'^labels/(?P<pk>\d+)/$',views.LabelRetrieveAPIView.as_view()),
    url(r'^labels/questions/$',views.LabelQuestionsAPIView.as_view())
    # url(r'^answer/$',views.CreateAnswerAPIView.as_view())
]

# router = DefaultRouter()
# router.register(r'answers', views.AnswerListAPIView, base_name='answers')
#
# urlpatterns = []
#
# urlpatterns += router.urls